<template>
  <a_page :是列表页="false">
    <a页头固定栏 :list="list" :详情="详情" />

    <el-form :model="单项" label-position="top" ref="formRef" :rules="rule" label-width="80px" class="">
      <div class="row q-gutter-md">
        <div class="w-full">
          <el-tag effect="plain">
            填报人:{{ util.fmt用户名(外键关联字段集.创建者) }}
          </el-tag>
          <el-tag effect="plain">
            询价日期:{{ util.fmt时间到天(单项.CreatedAt) }}
          </el-tag>
          <el-tag effect="plain">
            {{ 外键关联字段集.项目信息.项目名称 }}
          </el-tag>
          <!-- <el-tag effect="plain">
            更新者:{{ util.fmt用户名(外键关联字段集.更新者) }}
          </el-tag> -->
        </div>
        <!-- 泵 操 作 条 件 -->
        <q-card class="w-full">
          <q-card-section>
            <div class="text-h6 text-primary text-center">泵 操 作 条 件</div>
          </q-card-section>
          <q-separator inset />
          <q-card-section class="row q-gutter-md">
            <a表单字段 :插组件="插组件" :编辑否="true" :单项="单项" :字段组="插组件.筛选字段(['介质', '温度', '入口压力', '介质情况说明'])" />
          </q-card-section>
        </q-card>
        <!-- 结 构 参 数 -->
        <q-card class="w-full">
          <q-card-section>
            <div class="text-h6 text-primary text-center">结 构 参 数</div>
          </q-card-section>
          <q-separator inset />
          <q-card-section class="row q-gutter-md">
            <a表单字段 :插组件="插组件" :编辑否="true" :单项="单项" :字段组="插组件.筛选字段(['安装方式', '泵旋转方向', '支撑方式', '法兰等级','海拔'])" />
          </q-card-section>
        </q-card>
        <!-- 泵性能 -->
        <q-card class="w-full">
          <q-card-section>
            <div class="text-h6 text-primary text-center">泵性能</div>
          </q-card-section>
          <q-separator inset />
          <q-card-section class="row q-gutter-md">
            <el-form-item label="流量:" prop="流量">
              <el-input v-model="单项.流量" :clearable="true" />
            </el-form-item>
            <el-form-item label="扬程:" prop="扬程">
              <el-input v-model="单项.扬程" :clearable="true" />
            </el-form-item>
          </q-card-section>
        </q-card>
        <!-- 供货范围 -->
        <q-card class="w-full">
          <q-card-section>
            <div class="text-h6 text-primary text-center">供货范围</div>
          </q-card-section>
          <q-separator inset />
          <q-card-section class="row q-gutter-md">
            <el-form-item label="流量:" prop="流量">
              <el-input v-model="单项.流量" :clearable="true" />
            </el-form-item>
            <el-form-item label="扬程:" prop="扬程">
              <el-input v-model="单项.扬程" :clearable="true" />
            </el-form-item>
          </q-card-section>
        </q-card>
      </div>

      <!-- 
        <div class="col-1">
          <el-form-item label="数量:" prop="数量">
            <el-input v-model="单项.数量" :clearable="true" />
          </el-form-item>
        </div> -->

    </el-form>
  </a_page>
</template>

<script setup>
import { ref, reactive, onMounted, onBeforeUnmount, watch } from 'vue'
import * as util from '@/utils'
defineOptions({
  name: '项目管理/项目明细/详情',
})
const shape = ref('line')
const props = defineProps({
  list: Object,
  url: String,
  id: null
})

import use详情 from '@/hooks/use详情';
function 复制后处理(单项) {
  单项.客户单位 += 1
  单项.项目名称 += 1
}
const 外键组 = [{ 字段名: "项目信息" }]
const 详情 = use详情({ list: props.list, url: props.url, 复制后处理, 外键组 })
const { 单项, 初始化, formRef, rule, 外键关联字段集, 插组件 } = 详情

</script>

<style></style>
